from django.db import models
from django import forms
from django.forms import ModelForm
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from glowdrop.location.models import Location

class UserProfile(models.Model):

    user = models.ForeignKey(User, unique=True)
    bio = models.CharField(_('bio'), max_length=140, null=True)
    image_link = models.ImageField(upload_to='images', null=True)

    

class RegistrationForm(ModelForm):
    password = forms.CharField(label=_("Password"), widget=forms.PasswordInput)

    class Meta:
        model = User
        fields = ['email', 'username', 'password']
    

class Friend(models.Model):
    """ Frind model. add by sulpha, 2009.11.14
        uid : user Id
        fuid: friend user Id
        status: 0 or 1 0: uid is fuid's fans, 1: friend
        sealed: 1 for sealed, 0 for unsealed
    """
    uid = models.IntegerField()
    fuid = models.IntegerField()
    status = models.IntegerField()
    sealed = models.IntegerField()
    note = models.CharField(max_length=1024,null=True)
    dateline = models.DateTimeField(null=True)

